take the derivative of a trigonometric